package com.lh.project.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 订单表
 * @TableName order
 */
@TableName(value ="my_order")
@Data
public class Order implements Serializable {
    /**
     * 订单号，不为空，主键
     */
//    @TableField(value = "order_id")
//    @TableId(value = "order_id", type = IdType.AUTO)
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private Long orderId;
    /**
     * 用户id，不为空
     */
    @TableField(value = "order_user_id")
    private Long orderUserId;

    /**
     * 支付金额，不为空
     */
    @TableField(value = "order_pay_value")
    private Long orderPayValue;

    /**
     * 订餐的数目
     */
    @TableField(value = "order_count")
    private Integer orderCount;

    /**
     * 食物id，不为空
     */
    @TableField(value = "order_food_id")
    private Long orderFoodId;


    @TableField(value = "false")
    private String orderImg;

    @TableField(value = "false")
    private String foodName;

    /**
     * 创建时间， 默认是当前时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 0表示订单生效；1表示取消订单或者是已经生成了账单；默认是0
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}